| Conditions | 1 |
| Paths | 1 |
| Total Lines | 65 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | module.exports = function (gulp, plugins, config) { |
||
| 2 | return function javascript(cb) { |
||
| 3 | plugins.realFavicon.generateFavicon({ |
||
| 4 | masterPicture: 'assets/logo.svg', |
||
| 5 | dest: 'assets/favicon', |
||
| 6 | iconsPath: '.', |
||
| 7 | design: { |
||
| 8 | ios: { |
||
| 9 | pictureAspect: 'backgroundAndMargin', |
||
| 10 | backgroundColor: '#000000', |
||
| 11 | margin: '14%', |
||
| 12 | assets: { |
||
| 13 | ios6AndPriorIcons: false, |
||
| 14 | ios7AndLaterIcons: false, |
||
| 15 | precomposedIcons: false, |
||
| 16 | declareOnlyDefaultIcon: true |
||
| 17 | }, |
||
| 18 | appName: 'Meshviewer' |
||
| 19 | }, |
||
| 20 | desktopBrowser: {}, |
||
| 21 | windows: { |
||
| 22 | pictureAspect: 'noChange', |
||
| 23 | backgroundColor: '#dc0067', |
||
| 24 | onConflict: 'override', |
||
| 25 | assets: { |
||
| 26 | windows80Ie10Tile: false, |
||
| 27 | windows10Ie11EdgeTiles: { |
||
| 28 | small: true, |
||
| 29 | medium: true, |
||
| 30 | big: true, |
||
| 31 | rectangle: false |
||
| 32 | } |
||
| 33 | }, |
||
| 34 | appName: 'Meshviewer' |
||
| 35 | }, |
||
| 36 | androidChrome: { |
||
| 37 | // pictureAspect: 'shadow', |
||
| 38 | themeColor: '#dc0067', |
||
| 39 | manifest: { |
||
| 40 | name: 'Meshviewer', |
||
| 41 | display: 'standalone', |
||
| 42 | orientation: 'notSet', |
||
| 43 | onConflict: 'override', |
||
| 44 | declared: true |
||
| 45 | }, |
||
| 46 | assets: { |
||
| 47 | legacyIcon: false, |
||
| 48 | lowResolutionIcons: false |
||
| 49 | } |
||
| 50 | }, |
||
| 51 | safariPinnedTab: { |
||
| 52 | pictureAspect: 'silhouette', |
||
| 53 | themeColor: '#dc0067' |
||
| 54 | } |
||
| 55 | }, |
||
| 56 | settings: { |
||
| 57 | compression: 2, |
||
| 58 | scalingAlgorithm: 'Mitchell', |
||
| 59 | errorOnImageTooSmall: false |
||
| 60 | }, |
||
| 61 | markupFile: config.faviconData |
||
| 62 | }); |
||
| 63 | return cb(); |
||
| 64 | }; |
||
| 65 | }; |
||
| 66 |